package com.theta.gateway.infra.common.redis.constant;

import org.apache.commons.lang3.StringUtils;

/**
 * 网关redisKey定义
 * @author theta
 *
 */
public class GatewayRedisKey {
	
	//路由缓存有效时间，12小时
	public static final long GATEWAY_KEY_SERVICE_INFO_EXPIRE_TIME=12*60*60;

	
	//网关服务信息rediskey
	private static final String GATEWAY_KEY_SERVICE_INFO_KEY="GATEWAY_KEY:SERVICE_INFO:";

	
	/**
	 * 生成网关服务信息缓存key
	 * @param serviceId
	 * @return
	 */
	public static String genServiceInfoKey(String serviceId) {
		return StringUtils.join(GATEWAY_KEY_SERVICE_INFO_KEY,serviceId);
	}
}
